import { getPanel } from '@violentmonkey/ui'
import globalCss from '../style.css'
import { render } from 'solid-js/web'
import { App } from './app'
import styles, { stylesheet } from './style.module.css'

export function appRender () {
  const panel = getPanel({
    theme: 'dark',
    style: [globalCss, stylesheet].join('\n'),
    className: styles.panel,
  })
  Object.assign(panel.wrapper.style, {
    top: '10vh',
    left: '10vw',
    width: 300,
  })
  panel.setMovable(true)
  panel.show()
  render(App, panel.body)
}
